import 'dart:math';
import 'package:flustars/flustars.dart';
import 'package:get/get.dart';
import 'package:xm_app/common/logger/LoggerUtil.dart';
import 'package:xm_app/common/utils/DeviceInfo.dart';
import 'package:xm_app/model/User.dart';
import 'package:xm_app/routes/AppRoutes.dart';

class GlobalService extends GetxService {
  static GlobalService get to => Get.find(); // 添加这一行
  var count = 0.obs;
  final user = User().obs;

  init() async {
    logDebug("GlobalService init");
    await SpUtil.getInstance();
  }

  setUser(User user) {
    this.user.value = user;
  }
}
